
#include "Debug.h"

#ifdef ref
#undef ref
#endif
#ifdef out
#undef out
#endif

#if Windows
#    include <windows.h>
//#    include <sstream>
#else
#	include <android/log.h>
#	define LOG(...) ((void)__android_log_print(ANDROID_LOG_INFO, "Riccsson.System", __VA_ARGS__))
#endif

using namespace Riccsson::System;
using namespace Riccsson::System::Diagnostics;

void Debug::Assert(bool condition)
{
	throw;
}
void Debug::Assert(bool condition, string* message)
{
	throw;
}
void Debug::Assert(bool condition, string* message, string* detailMessage)
{
	throw;
}
void Debug::Assert(bool condition, string* message, string* detailMessageFormat, Array<object>* args)
{
	throw;
}
void Debug::Close()
{
	throw;
}
void Debug::Fail(string* message)
{
	throw;
}
void Debug::Fail(string* message, string* detailMessage)
{
	throw;
}
void Debug::Flush()
{
	throw;
}
void Debug::Indent()
{
	throw;
}
void Debug::Print(string* message)
{
	throw;
}
void Debug::Print(string* format, Array<object>* args)
{
	throw;
}
void Debug::Unindent()
{
	throw;
}
void Debug::Write(object* value)
{
	throw;
}
void Debug::Write(string* message)
{
	throw;
}
void Debug::Write(object* value, string* category)
{
	throw;
}
void Debug::Write(string* message, string* category)
{
	throw;
}
void Debug::WriteIf(bool condition, object* value)
{
	throw;
}
void Debug::WriteIf(bool condition, string* message)
{
	throw;
}
void Debug::WriteIf(bool condition, object value, string* category)
{
	throw;
}
void Debug::WriteIf(bool condition, string* message, string* category)
{
	throw;
}
void Debug::WriteLine(object* value)
{
	WriteLine( *value->ToString() );
}
void Debug::WriteLine(string* message)
{
	WriteLine( *message );
}
void Debug::WriteLine(object* value, string* category)
{
	throw;
}
void Debug::WriteLine(string* format, Array<object>* args)
{
	throw;
}
void Debug::WriteLine(string* message, string* category)
{
	throw;
}
void Debug::WriteLineIf(bool condition, object* value)
{
	if(condition)
		WriteLine( *value->ToString() );
}
void Debug::WriteLineIf(bool condition, string* message)
{
	if(condition)
		WriteLine( *message );
}
void Debug::WriteLineIf(bool condition, object* value, string* category)
{
	throw;
}
void Debug::WriteLineIf(bool condition, string* message, string* category)
{
	throw;
}

//void Debug::WriteLine(const char* message)
//{
//#if Windows
//
//	std::stringstream s;
//	s << message << std::endl;
//    OutputDebugStringA(s.str().c_str());
//
//#else
//
//	//std::cerr << message << std::flush;
//	LOG(message);
//
//#endif
//}

void Debug::WriteLine(const string& message)
{
#if Windows
	
	OutputDebugStringA(message.c_str());
	OutputDebugStringA("\n");
	
#else

	LOG(message.c_str());

#endif
}
